<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #cs{
            border:1px solid red;
        }
    </style>
</head>
<body>
    <canvas id="cs" width="800" height="400"></canvas>
    <script>
        let cs = document.getElementById("cs");
        let context = cs.getContext("2d");

        context.strokeStyle = "red";
        context.fillStyle = "blue";
        context.lineJoin = "bevel";
        context.lineWidth = 10;
        context.moveTo(10,10);
        context.lineTo(100,100);
        context.lineTo(100,10);
        // context.lineTo(10,10);
        context.closePath();
        // context.stroke();
        // context.fill();
        context.strokeStyle = "black";
        // context.beginPath();
        context.moveTo(200,200);
        context.lineTo(200,300)
        context.stroke();
        context.beginPath();
        context.strokeStyle = "red";
        context.rect(0,100,100,100);
        context.stroke();
        context.beginPath();
        context.fillRect(0,200,100,100);
        context.strokeRect(0,300,100,100);
        
        
</script>
</body>
</html>